package org.xgj.zhangben.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.xgj.zhangben.BaseEntity;

/**
 * 用户
 * 
 * @author xgj
 * 
 */
@Entity
@Table(name = "tb_user")
public class UserEntity extends BaseEntity {
	/**
	 * 基本信息
	 */
	// 用户名
	@Column(name = "USERNAME_", length = 12, nullable = false)
	private String username;
	// 登陆密码
	@Column(name = "PASSWORD_", columnDefinition = "CHAR(24)", nullable = false)
	private String password;
	// 电子邮箱
	@Column(name = "EMAIL_", length = 24, unique = true)
	private String email;
	// 注册时间
	@Column(name = "REGISTERTIME_", nullable = false)
	private Date registerTime = new Date();
	// 最后一次登陆时间
	@Column(name = "LASTLOGINTIME_")
	private Date lastLoginTime;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

}
